#include "httplib.h"

#define SER_IP "110.41.83.189"
#define SER_PORT 9090

using namespace httplib;
using namespace std;

int main()
{
  Client cli(SER_IP, SER_PORT); //建立与服务端的连接
  
  //组织数据
  MultipartFormData mul;
  mul.name = "file";
  mul.filename = "file.txt";
  mul.content = "Hello World!";
  mul.content_type = "text/plain";

  //push数据
  MultipartFormDataItems muls;
  muls.push_back(mul);

  //访问路径
  auto res = cli.Post("/Multipart", muls);

  //获取访问结果
  cout << res->status << endl;
  cout << res->body << endl;

  return 0;
}
